<?php

class MeterInfoModel extends CommonModel {
	protected $tableName = 'biz_meter';
	protected $_validate = array(
		array('name','require',''),
		);
		
	protected $_auto	 =	 array(
		array('last_update','time',self::MODEL_INSERT,'function'),
		);
	
        public function getBizInfoList($zoneids){
            $id = implode(',',$zoneids);
            $rs = $this->db->query('select  a.id,a.zoneid,a.meterid,a.m_price,a.metertype,b.name FROM  '.$this->tablePrefix.'biz_meter a,  '.$this->tablePrefix.'zone b WHERE a.zoneid=b.id  '.$where);

	    return $rs;
            
        } 
        public function updatePrint($resid){
            $rs = $this->db->execute('UPDATE '.$this->tablePrefix.'meter_record SET printflag=printflag+1  WHERE id='.$resid);
		if($result===false) {
			return false;
		}else {
                                            
                                            
                                            return true;
		}
        }


}
?>
